package com.edu.service.impl;

import com.edu.bean.User;
import com.edu.mapper.UserMapper;
import com.edu.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author:何包蛋
 * @Date :2022/12/7 - 12 - 07 - 20:17
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public int addUser(User user) {
        return userMapper.insertUser(user);
    }

    @Override
    public User getUserByName(String userName) {
        return userMapper.selectUserByName(userName);
    }

    @Override
    public List<User> getUserAll() {
        return userMapper.selectUserAll();
    }
}
